package com.springboot.test.java.model;

/**
 * @Author: TongRui乀
 * @Date: 2019-12-24 13:51
 * @description：
 */
public class Validator {

    private ValidatorStrategy validatorStrategy;

    public Validator(ValidatorStrategy validatorStrategy){
        this.validatorStrategy = validatorStrategy;
    }

    public boolean execute(String s){
        return this.validatorStrategy.valid(s);
    }

}
